1. Description
The PrintPage Web Control allows you to create a link which provides the print page functionality. This may be very useful for framed sites, where a surfer has to click on the correct frame before printing the page. The control described here makes the printing operation easier for the end user.
The control is customizable via several parameters.
The picture below shows a sample output of the control:
When a User clicks on the link, the Print dialogue appears:
This dialog allows a User to adjust printing settings.
Please refer to the Web Controls article for more information about creating Web Controls.
2. Installation Guide
The Print Page Web Control is distributed as a standard Sitecore package; hence in order to start using it, you should install the package. Please refer to the
Installing Modules and Packages
article if you are not familiar with the standard Sitecore Packager tool.
After the package installation, you will see the PrintPage Web Control in the list of renderings.
Thus you will be able to place it on a (sub)layout or a link via placeholder like any other rendering.
No modifications in the Sitecore Client are required to use this Web Control, but you can modify some setting (for example, tag prefix) by editing the following Item:
/sitecore/layout/Renderings/printpage.xml
3. User Manual
The PrintPage is a common Web Control thus you will be able to work with it like with any other rendering.
Double-click on the control in the Layout Studio and you’ll see the configuration window. Open the Attributes tab to set properties.
4. Valid Properties
CssClass
Type: System.String
Property value:
The Css class name for the control.
CssStyle
Type: System.String
Property value:
The style for the control.
LinkText
Type: System.String
Property value:
The text caption for the control. Default is ‘Print this page’.
LinkTitle
Type: System.String
Property value:
The text displayed when the mouse pointer hovers over the control. Default is ‘Print’.
Device
Type: System.String
Property value:
The string that identifies a device. This can be either a full Sitecore path to the device or an ID of the device or the name of the device. If the device is specified by its name, it will be searched under the /sitecore/layout/Devices/ folder. By default, the /sitecore/layout/Devices/Print device is used.
For example, if you want to use TestDevice, you should enter TestDevice or /sitecore/layout/Devices/TestDevice here.